package com.recycle.pojo;

import java.util.Date;

public class Category {
    private Integer id;

    private String name;

    private Integer parentId;

    private Date cretaedAt;

    private Date updatedAt;

    public Category(Integer id, String name, Integer parentId, Date cretaedAt, Date updatedAt) {
        this.id = id;
        this.name = name;
        this.parentId = parentId;
        this.cretaedAt = cretaedAt;
        this.updatedAt = updatedAt;
    }

    public Category() {
        super();
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public Date getCretaedAt() {
        return cretaedAt;
    }

    public void setCretaedAt(Date cretaedAt) {
        this.cretaedAt = cretaedAt;
    }

    public Date getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(Date updatedAt) {
        this.updatedAt = updatedAt;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", parentId=").append(parentId);
        sb.append(", cretaedAt=").append(cretaedAt);
        sb.append(", updatedAt=").append(updatedAt);
        sb.append("]");
        return sb.toString();
    }
}